<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Test unit filtering</title>
<link rel="stylesheet" href="../../boostbook.css" type="text/css">
<meta name="generator" content="DocBook XSL Stylesheets V1.79.1">
<link rel="home" href="../../index.html" title="Boost.Test">
<link rel="up" href="../runtime_config.html" title="Runtime parameters">
<link rel="prev" href="../runtime_config.html" title="Runtime parameters">
<link rel="next" href="custom_command_line_arguments.html" title="Custom command line arguments">
</head>
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
<table cellpadding="2" width="100%"><tr>
<td valign="top"><img alt="Boost C++ Libraries" width="277" height="86" src="../../../../../../boost.png"></td>
<td align="center"><a href="../../../../../../index.html">Home</a></td>
<td align="center"><a href="../../../../../../libs/libraries.htm">Libraries</a></td>
<td align="center"><a href="http://www.boost.org/users/people.html">People</a></td>
<td align="center"><a href="http://www.boost.org/users/faq.html">FAQ</a></td>
<td align="center"><a href="../../../../../../more/index.htm">More</a></td>
</tr></table>
<hr>
<div class="spirit-nav">
<a accesskey="p" href="../runtime_config.html"><img src="../../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../runtime_config.html"><img src="../../../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../../index.html"><img src="../../../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="custom_command_line_arguments.html"><img src="../../../../../../doc/src/images/next.png" alt="Next"></a>
</div>
<div class="section">
<div class="titlepage"><div><div><h3 class="title">
<a name="boost_test.runtime_config.test_unit_filtering"></a><a class="link" href="test_unit_filtering.html" title="Test unit filtering">Test unit
      filtering</a>
</h3></div></div></div>
<p>
        The <span class="emphasis"><em>Unit Test Framework</em></span> offers a number of ways to run
        only a subset of all test cases registered in the test tree.
      </p>
<a name="ref_default_run_status"></a><h4>
<a name="boost_test.runtime_config.test_unit_filtering.h0"></a>
        <span class="phrase"><a name="boost_test.runtime_config.test_unit_filtering.default_run_status"></a></span><a class="link" href="test_unit_filtering.html#boost_test.runtime_config.test_unit_filtering.default_run_status">Default
        run status</a>
      </h4>
<p>
        Each test unit (either test case or test suite) has an associated <span class="emphasis"><em>default
        run status</em></span>. It can assume one of the three values:
      </p>
<div class="orderedlist"><ol class="orderedlist" type="1">
<li class="listitem">
            <span class="emphasis"><em>true</em></span> -- this means that, unless some runtime parameters
            specify otherwise, the test unit is designated to be run.
          </li>
<li class="listitem">
            <span class="emphasis"><em>false</em></span> -- this means that, unless some runtime parameters
            specify otherwise, the test unit is designated <span class="emphasis"><em>not</em></span>
            to be run.
          </li>
<li class="listitem">
            <span class="emphasis"><em>inherit</em></span> -- this means that the test unit's default
            run status is the same as that of its immediate parent test unit. This
            is applied recursively.
          </li>
</ol></div>
<p>
        Initially, the master test suite has default run status set to <span class="emphasis"><em>true</em></span>.
        All other test units have default run status set to <span class="emphasis"><em>inherit</em></span>.
        This implies that, unless any additional configuration is applied, all tests
        are designated to be run.
      </p>
<p>
        You can set a different default run status in any test unit by using <a class="link" href="../tests_organization/decorators.html" title="Decorators">decorators</a>: <a class="link" href="../utf_reference/test_org_reference/decorator_enabled.html" title="enabled / disabled (decorator)"><code class="computeroutput"><span class="identifier">disabled</span></code></a>, <a class="link" href="../utf_reference/test_org_reference/decorator_enabled.html" title="enabled / disabled (decorator)"><code class="computeroutput"><span class="identifier">enabled</span></code></a> and <a class="link" href="../utf_reference/test_org_reference/decorator_enable_if.html" title="enable_if (decorator)"><code class="computeroutput"><span class="identifier">enable_if</span></code></a>. The default run status
        is set once, upon testing program initialization, and cannot be changed.
        The disabled tests are not executed by default, but are still present in
        the test tree, and are listed along with other tests when you use command-line
        argument <a class="link" href="../utf_reference/rt_param_reference/list_content.html" title="list_content"><code class="computeroutput"><span class="identifier">list_content</span></code></a>.
      </p>
<h6>
<a name="boost_test.runtime_config.test_unit_filtering.h1"></a>
        <span class="phrase"><a name="boost_test.runtime_config.test_unit_filtering.example_descr"></a></span><a class="link" href="test_unit_filtering.html#boost_test.runtime_config.test_unit_filtering.example_descr">Example:
        default run status</a>
      </h6>
<div class="informaltable"><table class="table">
<colgroup><col></colgroup>
<thead><tr><th>
                <p>
                  Code
                </p>
              </th></tr></thead>
<tbody><tr><td>
<pre xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" class="table-programlisting"><span class="preprocessor">#define</span> <span class="identifier">BOOST_TEST_MODULE</span> <span class="identifier">decorator_20</span>
<span class="preprocessor">#include</span> <span class="special">&lt;</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">test</span><span class="special">/</span><span class="identifier">included</span><span class="special">/</span><span class="identifier">unit_test</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">&gt;</span>

<span class="keyword">namespace</span> <span class="identifier">utf</span> <span class="special">=</span> <span class="identifier">boost</span><span class="special">::</span><span class="identifier">unit_test</span><span class="special">;</span>

<span class="keyword">const</span> <span class="keyword">bool</span> <span class="identifier">io_implemented</span> <span class="special">=</span> <span class="keyword">true</span><span class="special">;</span>
<span class="keyword">const</span> <span class="keyword">bool</span> <span class="identifier">db_implemented</span> <span class="special">=</span> <span class="keyword">false</span><span class="special">;</span>

<span class="identifier">BOOST_AUTO_TEST_SUITE</span><span class="special">(</span><span class="identifier">suite1</span><span class="special">,</span> <span class="special">*</span> <span class="identifier">utf</span><span class="special">::</span><span class="identifier">disabled</span><span class="special">())</span>

  <span class="identifier">BOOST_AUTO_TEST_CASE</span><span class="special">(</span><span class="identifier">test_1</span><span class="special">)</span>
  <span class="special">{</span>
    <span class="identifier">BOOST_TEST</span><span class="special">(</span><span class="number">1</span> <span class="special">!=</span> <span class="number">1</span><span class="special">);</span>
  <span class="special">}</span>

  <span class="identifier">BOOST_AUTO_TEST_CASE</span><span class="special">(</span><span class="identifier">test_2</span><span class="special">,</span> <span class="special">*</span> <span class="identifier">utf</span><span class="special">::</span><span class="identifier">enabled</span><span class="special">())</span>
  <span class="special">{</span>
    <span class="identifier">BOOST_TEST</span><span class="special">(</span><span class="number">2</span> <span class="special">!=</span> <span class="number">2</span><span class="special">);</span>
  <span class="special">}</span>

  <span class="identifier">BOOST_AUTO_TEST_CASE</span><span class="special">(</span><span class="identifier">test_io</span><span class="special">,</span>
    <span class="special">*</span> <span class="identifier">utf</span><span class="special">::</span><span class="identifier">enable_if</span><span class="special">&lt;</span><span class="identifier">io_implemented</span><span class="special">&gt;())</span>
  <span class="special">{</span>
    <span class="identifier">BOOST_TEST</span><span class="special">(</span><span class="number">3</span> <span class="special">!=</span> <span class="number">3</span><span class="special">);</span>
  <span class="special">}</span>

  <span class="identifier">BOOST_AUTO_TEST_CASE</span><span class="special">(</span><span class="identifier">test_db</span><span class="special">,</span>
    <span class="special">*</span> <span class="identifier">utf</span><span class="special">::</span><span class="identifier">enable_if</span><span class="special">&lt;</span><span class="identifier">db_implemented</span><span class="special">&gt;())</span>
  <span class="special">{</span>
    <span class="identifier">BOOST_TEST</span><span class="special">(</span><span class="number">4</span> <span class="special">!=</span> <span class="number">4</span><span class="special">);</span>
  <span class="special">}</span>

<span class="identifier">BOOST_AUTO_TEST_SUITE_END</span><span class="special">()</span>
</pre>
              </td></tr></tbody>
</table></div>
<div class="informaltable"><table class="table">
<colgroup><col></colgroup>
<thead><tr><th>
                <p>
                  Output
                </p>
              </th></tr></thead>
<tbody><tr><td>
<pre xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" class="table-programlisting"><span class="special">&gt;</span> <span class="identifier">decorator_20</span>
<span class="identifier">Running</span> <span class="number">2</span> <span class="identifier">test</span> <span class="identifier">cases</span><span class="special">...</span>
<span class="identifier">test</span><span class="special">.</span><span class="identifier">cpp</span><span class="special">(</span><span class="number">18</span><span class="special">):</span> <span class="identifier">error</span><span class="special">:</span> <span class="identifier">in</span> <span class="string">"suite1/test_2"</span><span class="special">:</span> <span class="identifier">check</span> <span class="number">2</span> <span class="special">!=</span> <span class="number">2</span> <span class="identifier">has</span> <span class="identifier">failed</span> <span class="special">[</span><span class="number">2</span> <span class="special">==</span> <span class="number">2</span><span class="special">]</span>
<span class="identifier">test</span><span class="special">.</span><span class="identifier">cpp</span><span class="special">(</span><span class="number">24</span><span class="special">):</span> <span class="identifier">error</span><span class="special">:</span> <span class="identifier">in</span> <span class="string">"suite1/test_io"</span><span class="special">:</span> <span class="identifier">check</span> <span class="number">3</span> <span class="special">!=</span> <span class="number">3</span> <span class="identifier">has</span> <span class="identifier">failed</span> <span class="special">[</span><span class="number">3</span> <span class="special">==</span> <span class="number">3</span><span class="special">]</span>

<span class="special">***</span> <span class="number">2</span> <span class="identifier">failures</span> <span class="identifier">are</span> <span class="identifier">detected</span> <span class="identifier">in</span> <span class="identifier">the</span> <span class="identifier">test</span> <span class="identifier">module</span> <span class="string">"decorator_20"</span>

<span class="special">&gt;</span> <span class="identifier">decorator_20</span> <span class="special">--</span><span class="identifier">list_content</span>
<span class="identifier">suite1</span><span class="special">*</span>
    <span class="identifier">test_1</span>
    <span class="identifier">test_2</span><span class="special">*</span>
    <span class="identifier">test_io</span><span class="special">*</span>
    <span class="identifier">test_db</span>
</pre>
              </td></tr></tbody>
</table></div>
<a name="ref_dynamic_test_dependency"></a><h4>
<a name="boost_test.runtime_config.test_unit_filtering.h2"></a>
        <span class="phrase"><a name="boost_test.runtime_config.test_unit_filtering.dynamic_test_dependencies"></a></span><a class="link" href="test_unit_filtering.html#boost_test.runtime_config.test_unit_filtering.dynamic_test_dependencies">Dynamic
        test dependencies</a>
      </h4>
<p>
        Additionally, it is possible to statically associate a test unit with a condition.
        This associated condition is evaluated immediately before executing the test
        unit. If the condition is met, the test unit is executed. Otherwise, the
        test unit is <span class="emphasis"><em>skipped</em></span>. It is possible to add two dependencies:
      </p>
<div class="orderedlist"><ol class="orderedlist" type="1">
<li class="listitem">
            Upon another test unit. In this case the decorated test case is skipped
            if the test unit specified in the dependency is either failed or skipped
            or disabled. This can be declared with decorator <a class="link" href="../utf_reference/test_org_reference/decorator_depends_on.html" title="depends_on (decorator)"><code class="computeroutput"><span class="identifier">depends_on</span></code></a>.
          </li>
<li class="listitem">
            Upon an arbitrary predicate. This can be declared with decorator <a class="link" href="../utf_reference/test_org_reference/decorator_precondition.html" title="precondition (decorator)"><code class="computeroutput"><span class="identifier">precondition</span></code></a>.
          </li>
</ol></div>
<a name="ref_command_line_control"></a><h4>
<a name="boost_test.runtime_config.test_unit_filtering.h3"></a>
        <span class="phrase"><a name="boost_test.runtime_config.test_unit_filtering.command_line_control"></a></span><a class="link" href="test_unit_filtering.html#boost_test.runtime_config.test_unit_filtering.command_line_control">Command-line
        control</a>
      </h4>
<p>
        Static configuration of the test-case filtering is used by default, unless
        command-line filtering is applied. With command-line argument <a class="link" href="../utf_reference/rt_param_reference/run_test.html" title="run_test"><code class="computeroutput"><span class="identifier">run_test</span></code></a> it is possible to alter
        the static pre-set in a number of ways:
      </p>
<div class="orderedlist"><ol class="orderedlist" type="1">
<li class="listitem">
            Ignore the static configuration and manually specify test cases to be
            run.
          </li>
<li class="listitem">
            Augment the statically defined set by enabling the disabled test cases.
          </li>
<li class="listitem">
            Shrink the statically defined set by disabling some of the enabled test
            cases.
          </li>
</ol></div>
<a name="ref_command_line_control_absolute"></a><h5>
<a name="boost_test.runtime_config.test_unit_filtering.h4"></a>
        <span class="phrase"><a name="boost_test.runtime_config.test_unit_filtering.absolute_specification"></a></span><a class="link" href="test_unit_filtering.html#boost_test.runtime_config.test_unit_filtering.absolute_specification">Absolute
        specification</a>
      </h5>
<p>
        Term 'absolute' in this context means that the default run status of the
        test units, which has been statically set up, is completely ignored and the
        tests to be run are specified manually from scratch. First, in order to learn
        what test units are registered in the test tree the user needs to use command-line
        argument <a class="link" href="../utf_reference/rt_param_reference/list_content.html" title="list_content"><code class="computeroutput"><span class="identifier">list_content</span></code></a>. Next, in order to
        specify a set of test cases, the user needs to use command-line argument
        <a class="link" href="../utf_reference/rt_param_reference/run_test.html" title="run_test"><code class="computeroutput"><span class="identifier">run_test</span></code></a> with absolute value:
      </p>
<pre class="programlisting"><span class="special">&gt;</span> <span class="identifier">test_program</span> <span class="special">--</span><a class="link" href="../utf_reference/rt_param_reference/run_test.html" title="run_test"><code class="computeroutput"><span class="identifier">run_test</span></code></a><span class="special">=&lt;</span><span class="identifier">test_set</span><span class="special">&gt;</span>
</pre>
<p>
        The format of <code class="computeroutput"><span class="special">&lt;</span><span class="identifier">test_set</span><span class="special">&gt;</span></code> value can assume a number of forms. Given
        the following program:
      </p>
<pre class="programlisting"><span class="preprocessor">#define</span> <a class="link" href="../utf_reference/link_references/link_boost_test_module_macro.html" title="BOOST_TEST_MODULE"><code class="computeroutput"><span class="identifier">BOOST_TEST_MODULE</span></code></a> <span class="identifier">example</span>
<span class="preprocessor">#include</span> <span class="special">&lt;</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">test</span><span class="special">/</span><span class="identifier">included</span><span class="special">/</span><span class="identifier">unit_test</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">&gt;</span>

<span class="keyword">using</span> <span class="identifier">boost</span><span class="special">::</span><span class="identifier">unit_test</span><span class="special">::</span><a class="link" href="../utf_reference/test_org_reference/decorator_label.html" title="label (decorator)"><code class="computeroutput"><span class="identifier">label</span></code></a><span class="special">;</span>

<a class="link" href="../utf_reference/test_org_reference/test_org_boost_auto_test_case.html" title="BOOST_AUTO_TEST_CASE"><code class="computeroutput"><span class="identifier">BOOST_AUTO_TEST_CASE</span></code></a><span class="special">(</span><span class="identifier">test_1</span><span class="special">,</span> <span class="special">*</span><span class="identifier">label</span><span class="special">(</span><span class="string">"L1"</span><span class="special">))</span> <span class="special">{}</span>
<span class="identifier">BOOST_AUTO_TEST_CASE</span><span class="special">(</span><span class="identifier">test_2</span><span class="special">,</span> <span class="special">*</span><span class="identifier">label</span><span class="special">(</span><span class="string">"L1"</span><span class="special">))</span> <span class="special">{}</span>

<a class="link" href="../utf_reference/test_org_reference/test_org_boost_auto_test_suite.html" title="BOOST_AUTO_TEST_SUITE"><code class="computeroutput"><span class="identifier">BOOST_AUTO_TEST_SUITE</span></code></a><span class="special">(</span><span class="identifier">suite_1</span><span class="special">)</span>

  <span class="identifier">BOOST_AUTO_TEST_SUITE</span><span class="special">(</span><span class="identifier">suite_1</span><span class="special">)</span>
    <span class="identifier">BOOST_AUTO_TEST_CASE</span><span class="special">(</span><span class="identifier">test_1</span><span class="special">)</span> <span class="special">{}</span>
    <span class="identifier">BOOST_AUTO_TEST_CASE</span><span class="special">(</span><span class="identifier">test_2</span><span class="special">)</span> <span class="special">{}</span>
  <span class="identifier">BOOST_AUTO_TEST_SUITE_END</span><span class="special">()</span>

  <span class="identifier">BOOST_AUTO_TEST_SUITE</span><span class="special">(</span><span class="identifier">suite_2</span><span class="special">)</span>
    <span class="identifier">BOOST_AUTO_TEST_CASE</span><span class="special">(</span><span class="identifier">test_1</span><span class="special">,</span> <span class="special">*</span><span class="identifier">label</span><span class="special">(</span><span class="string">"L2"</span><span class="special">))</span> <span class="special">{}</span>
    <span class="identifier">BOOST_AUTO_TEST_CASE</span><span class="special">(</span><span class="identifier">test_2</span><span class="special">,</span> <span class="special">*</span><span class="identifier">label</span><span class="special">(</span><span class="string">"L2"</span><span class="special">))</span> <span class="special">{}</span>
  <span class="identifier">BOOST_AUTO_TEST_SUITE_END</span><span class="special">()</span>

  <span class="identifier">BOOST_AUTO_TEST_CASE</span><span class="special">(</span><span class="identifier">test_1</span><span class="special">,</span> <span class="special">*</span><span class="identifier">label</span><span class="special">(</span><span class="string">"L1"</span><span class="special">))</span> <span class="special">{}</span>
  <span class="identifier">BOOST_AUTO_TEST_CASE</span><span class="special">(</span><span class="identifier">test_2</span><span class="special">)</span> <span class="special">{}</span>
  <span class="identifier">BOOST_AUTO_TEST_CASE</span><span class="special">(</span><span class="identifier">test_2A</span><span class="special">)</span> <span class="special">{}</span>

<span class="identifier">BOOST_AUTO_TEST_SUITE_END</span><span class="special">()</span>
</pre>
<p>
        The following table illustrates how different values of <code class="computeroutput"><span class="special">&lt;</span><span class="identifier">test_set</span><span class="special">&gt;</span></code>
        control which test cases ware run.
      </p>
<div class="informaltable"><table class="table">
<colgroup>
<col>
<col>
<col>
</colgroup>
<thead><tr>
<th>
                <p>
                  Description
                </p>
              </th>
<th>
                <p>
                  Parameter value
                </p>
              </th>
<th>
                <p>
                  Test cases run
                </p>
              </th>
</tr></thead>
<tbody>
<tr>
<td>
                <p>
                  Run single top-level test case by name
                </p>
              </td>
<td>
<pre xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" class="table-programlisting"><a class="link" href="../utf_reference/rt_param_reference/run_test.html" title="run_test"><code class="computeroutput"><span class="identifier">run_test</span></code></a>=test_1</pre>
              </td>
<td>
<pre xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" class="table-programlisting">test_1
</pre>
              </td>
</tr>
<tr>
<td>
                <p>
                  Run single nested test case by name
                </p>
              </td>
<td>
<pre xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" class="table-programlisting"><a class="link" href="../utf_reference/rt_param_reference/run_test.html" title="run_test"><code class="computeroutput"><span class="identifier">run_test</span></code></a>=suite_1/suite_1/test_1</pre>
              </td>
<td>
<pre xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" class="table-programlisting">suite_1/suite_1/test_1
</pre>
              </td>
</tr>
<tr>
<td>
                <p>
                  Run single test suite by name
                </p>
              </td>
<td>
<pre xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" class="table-programlisting"><a class="link" href="../utf_reference/rt_param_reference/run_test.html" title="run_test"><code class="computeroutput"><span class="identifier">run_test</span></code></a>=suite_1/suite_2
<a class="link" href="../utf_reference/rt_param_reference/run_test.html" title="run_test"><code class="computeroutput"><span class="identifier">run_test</span></code></a>=suite_1/suite_2/*
</pre>
              </td>
<td>
<pre xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" class="table-programlisting">suite_1/suite_2/test_1
suite_1/suite_2/test_2
</pre>
              </td>
</tr>
<tr>
<td>
                <p>
                  Run multiple test units that are <span class="bold"><strong>siblings</strong></span>
                  of the same test suite
                </p>
              </td>
<td>
<pre xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" class="table-programlisting"><a class="link" href="../utf_reference/rt_param_reference/run_test.html" title="run_test"><code class="computeroutput"><span class="identifier">run_test</span></code></a>=suite_1/test_1,suite_2</pre>
              </td>
<td>
<pre xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" class="table-programlisting">suite_1/suite_2/test_1
suite_1/suite_2/test_2
suite_1/test_1
</pre>
              </td>
</tr>
<tr>
<td>
                <p>
                  Run multiple test units that are not necessarily siblings
                </p>
              </td>
<td>
<pre xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" class="table-programlisting"><a class="link" href="../utf_reference/rt_param_reference/run_test.html" title="run_test"><code class="computeroutput"><span class="identifier">run_test</span></code></a>=suite_1/test_1:test_1</pre>
              </td>
<td>
<pre xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" class="table-programlisting">suite_1/test_1
test_1
</pre>
              </td>
</tr>
<tr>
<td>
                <p>
                  Run all tests matching to a given label
                </p>
              </td>
<td>
<pre xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" class="table-programlisting"><a class="link" href="../utf_reference/rt_param_reference/run_test.html" title="run_test"><code class="computeroutput"><span class="identifier">run_test</span></code></a>=@L1</pre>
              </td>
<td>
<pre xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" class="table-programlisting">test_1
test_2
suite_1/test_1
</pre>
              </td>
</tr>
<tr>
<td>
                <p>
                  Run every test case in the test tree. Note that this will also
                  enable all disabled tests.
                </p>
              </td>
<td>
<pre xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" class="table-programlisting"><a class="link" href="../utf_reference/rt_param_reference/run_test.html" title="run_test"><code class="computeroutput"><span class="identifier">run_test</span></code></a>=*</pre>
              </td>
<td>
<pre xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" class="table-programlisting">test_1
test_2
suite_1/suite_1/test_1
suite_1/suite_1/test_2
suite_1/suite_2/test_1
suite_1/suite_2/test_2
suite_1/test_1
suite_1/test_2
suite_1/test_2A
</pre>
              </td>
</tr>
<tr>
<td>
                <p>
                  Run every test unit in a given suite with a given prefix
                </p>
              </td>
<td>
<pre xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" class="table-programlisting"><a class="link" href="../utf_reference/rt_param_reference/run_test.html" title="run_test"><code class="computeroutput"><span class="identifier">run_test</span></code></a>=suite_1/test*</pre>
              </td>
<td>
<pre xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" class="table-programlisting">suite_1/test_1
suite_1/test_2
suite_1/test_2A
</pre>
              </td>
</tr>
<tr>
<td>
                <p>
                  Run every test unit in a given suite with a given suffix
                </p>
              </td>
<td>
<pre xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" class="table-programlisting"><a class="link" href="../utf_reference/rt_param_reference/run_test.html" title="run_test"><code class="computeroutput"><span class="identifier">run_test</span></code></a>=suite_1/*_1</pre>
              </td>
<td>
<pre xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" class="table-programlisting">suite_1/suite_1/test_1
suite_1/suite_1/test_2
suite_1/test_1
</pre>
              </td>
</tr>
<tr>
<td>
                <p>
                  Run every test unit in a given suite with a given infix
                </p>
              </td>
<td>
<pre xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" class="table-programlisting"><a class="link" href="../utf_reference/rt_param_reference/run_test.html" title="run_test"><code class="computeroutput"><span class="identifier">run_test</span></code></a>=suite_1/*_2*</pre>
              </td>
<td>
<pre xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" class="table-programlisting">suite_1/suite_2/test_1
suite_1/suite_2/test_2
suite_1/test_2
suite_1/test_2A
</pre>
              </td>
</tr>
<tr>
<td>
                <p>
                  Run test(s) with given name in any N-level suite
                </p>
              </td>
<td>
<pre xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" class="table-programlisting"><a class="link" href="../utf_reference/rt_param_reference/run_test.html" title="run_test"><code class="computeroutput"><span class="identifier">run_test</span></code></a>=*/*/test_2</pre>
              </td>
<td>
<pre xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" class="table-programlisting">suite_1/suite_1/test_2
suite_1/suite_2/test_2
</pre>
              </td>
</tr>
</tbody>
</table></div>
<p>
        For the syntax productions describing the structure of <code class="computeroutput"><span class="special">&lt;</span><span class="identifier">test_set</span><span class="special">&gt;</span></code>
        value see <a class="link" href="../utf_reference/rt_param_reference/run_test.html" title="run_test">here</a>.
      </p>
<p>
        While using manual absolute test case specification ignores the default run
        status, it does not ignore the dynamic test dependencies. If test unit <code class="computeroutput"><span class="identifier">B</span></code> depends on test unit <code class="computeroutput"><span class="identifier">A</span></code>
        and test <code class="computeroutput"><span class="identifier">B</span></code> is specified to
        be run by <a class="link" href="../utf_reference/rt_param_reference/run_test.html" title="run_test"><code class="computeroutput"><span class="identifier">run_test</span></code></a>, <code class="computeroutput"><span class="identifier">A</span></code>
        is also run, even if it is not specified, and its failure may cause the execution
        of <code class="computeroutput"><span class="identifier">B</span></code> to be skipped. Similarly,
        the failed check of the <a class="link" href="../utf_reference/test_org_reference/decorator_precondition.html" title="precondition (decorator)"><code class="computeroutput"><span class="identifier">precondition</span></code></a> may cause the test
        selected test to be skipped.
      </p>
<h6>
<a name="boost_test.runtime_config.test_unit_filtering.h5"></a>
        <span class="phrase"><a name="boost_test.runtime_config.test_unit_filtering.example_descr0"></a></span><a class="link" href="test_unit_filtering.html#boost_test.runtime_config.test_unit_filtering.example_descr0">Example:
        run_test and dynamic dependencies</a>
      </h6>
<div class="informaltable"><table class="table">
<colgroup><col></colgroup>
<thead><tr><th>
                <p>
                  Code
                </p>
              </th></tr></thead>
<tbody><tr><td>
<pre xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" class="table-programlisting"><span class="preprocessor">#define</span> <span class="identifier">BOOST_TEST_MODULE</span> <span class="identifier">decorator_21</span>
<span class="preprocessor">#include</span> <span class="special">&lt;</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">test</span><span class="special">/</span><span class="identifier">included</span><span class="special">/</span><span class="identifier">unit_test</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">&gt;</span>

<span class="keyword">namespace</span> <span class="identifier">utf</span> <span class="special">=</span> <span class="identifier">boost</span><span class="special">::</span><span class="identifier">unit_test</span><span class="special">;</span>
<span class="keyword">namespace</span> <span class="identifier">tt</span> <span class="special">=</span> <span class="identifier">boost</span><span class="special">::</span><span class="identifier">test_tools</span><span class="special">;</span>

<span class="identifier">tt</span><span class="special">::</span><span class="identifier">assertion_result</span> <span class="identifier">fail</span><span class="special">(</span><span class="identifier">utf</span><span class="special">::</span><span class="identifier">test_unit_id</span><span class="special">)</span>
<span class="special">{</span>
  <span class="identifier">tt</span><span class="special">::</span><span class="identifier">assertion_result</span> <span class="identifier">ans</span><span class="special">(</span><span class="keyword">false</span><span class="special">);</span>
  <span class="identifier">ans</span><span class="special">.</span><span class="identifier">message</span><span class="special">()</span> <span class="special">&lt;&lt;</span> <span class="string">"precondition failed"</span><span class="special">;</span>
  <span class="keyword">return</span> <span class="identifier">ans</span><span class="special">;</span>
<span class="special">}</span>

<span class="identifier">BOOST_AUTO_TEST_CASE</span><span class="special">(</span><span class="identifier">test_1</span><span class="special">)</span>
<span class="special">{</span>
  <span class="identifier">BOOST_TEST</span><span class="special">(</span><span class="keyword">false</span><span class="special">);</span>
<span class="special">}</span>

<span class="identifier">BOOST_AUTO_TEST_CASE</span><span class="special">(</span><span class="identifier">test_2</span><span class="special">,</span>
  <span class="special">*</span> <span class="identifier">utf</span><span class="special">::</span><span class="identifier">depends_on</span><span class="special">(</span><span class="string">"test_1"</span><span class="special">))</span>
<span class="special">{</span>
  <span class="identifier">BOOST_TEST</span><span class="special">(</span><span class="keyword">true</span><span class="special">);</span>
<span class="special">}</span>

<span class="identifier">BOOST_AUTO_TEST_CASE</span><span class="special">(</span><span class="identifier">test_3</span><span class="special">,</span>
  <span class="special">*</span> <span class="identifier">utf</span><span class="special">::</span><span class="identifier">precondition</span><span class="special">(</span><span class="identifier">fail</span><span class="special">))</span>
<span class="special">{</span>
  <span class="identifier">BOOST_TEST</span><span class="special">(</span><span class="keyword">true</span><span class="special">);</span>
<span class="special">}</span>
</pre>
              </td></tr></tbody>
</table></div>
<div class="informaltable"><table class="table">
<colgroup><col></colgroup>
<thead><tr><th>
                <p>
                  Output
                </p>
              </th></tr></thead>
<tbody><tr><td>
<pre xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" class="table-programlisting"><span class="special">&gt;</span> <span class="identifier">decorator_21</span> <span class="special">--</span><span class="identifier">log_level</span><span class="special">=</span><span class="identifier">test_suite</span> <span class="special">--</span><span class="identifier">run_test</span><span class="special">=</span><span class="identifier">test_2</span><span class="special">,</span><span class="identifier">test_3</span>
<span class="identifier">Including</span> <span class="identifier">test</span> <span class="keyword">case</span> <span class="identifier">test_1</span> <span class="identifier">as</span> <span class="identifier">a</span> <span class="identifier">dependency</span> <span class="identifier">of</span> <span class="identifier">test</span> <span class="keyword">case</span> <span class="identifier">test_2</span>
<span class="identifier">Running</span> <span class="number">3</span> <span class="identifier">test</span> <span class="identifier">cases</span><span class="special">...</span>
<span class="identifier">Entering</span> <span class="identifier">test</span> <span class="identifier">module</span> <span class="string">"decorator_21"</span>
<span class="identifier">test</span><span class="special">.</span><span class="identifier">cpp</span><span class="special">(</span><span class="number">14</span><span class="special">):</span> <span class="identifier">Entering</span> <span class="identifier">test</span> <span class="keyword">case</span> <span class="string">"test_1"</span>
<span class="identifier">test</span><span class="special">.</span><span class="identifier">cpp</span><span class="special">(</span><span class="number">16</span><span class="special">):</span> <span class="identifier">error</span><span class="special">:</span> <span class="identifier">in</span> <span class="string">"test_1"</span><span class="special">:</span> <span class="identifier">check</span> <span class="keyword">false</span> <span class="identifier">has</span> <span class="identifier">failed</span>
<span class="identifier">test</span><span class="special">.</span><span class="identifier">cpp</span><span class="special">(</span><span class="number">14</span><span class="special">):</span> <span class="identifier">Leaving</span> <span class="identifier">test</span> <span class="keyword">case</span> <span class="string">"test_1"</span><span class="special">;</span> <span class="identifier">testing</span> <span class="identifier">time</span><span class="special">:</span> <span class="number">3</span><span class="identifier">ms</span>
<span class="identifier">test</span><span class="special">.</span><span class="identifier">cpp</span><span class="special">(</span><span class="number">26</span><span class="special">):</span> <span class="identifier">Test</span> <span class="keyword">case</span> <span class="string">"test_3"</span> <span class="identifier">is</span> <span class="identifier">skipped</span> <span class="identifier">because</span> <span class="identifier">precondition</span> <span class="identifier">failed</span>
<span class="identifier">test</span><span class="special">.</span><span class="identifier">cpp</span><span class="special">(</span><span class="number">20</span><span class="special">):</span> <span class="identifier">Test</span> <span class="keyword">case</span> <span class="string">"test_2"</span> <span class="identifier">is</span> <span class="identifier">skipped</span> <span class="identifier">because</span> <span class="identifier">dependency</span> <span class="identifier">test</span> <span class="keyword">case</span> <span class="string">"test_1"</span> <span class="identifier">has</span> <span class="identifier">failed</span>
<span class="identifier">Leaving</span> <span class="identifier">test</span> <span class="identifier">module</span> <span class="string">"decorator_21"</span><span class="special">;</span> <span class="identifier">testing</span> <span class="identifier">time</span><span class="special">:</span> <span class="number">17</span><span class="identifier">ms</span>

<span class="special">***</span> <span class="number">1</span> <span class="identifier">failure</span> <span class="identifier">is</span> <span class="identifier">detected</span> <span class="identifier">in</span> <span class="identifier">the</span> <span class="identifier">test</span> <span class="identifier">module</span> <span class="string">"decorator_21"</span>
</pre>
              </td></tr></tbody>
</table></div>
<a name="ref_command_line_control_enablers"></a><h5>
<a name="boost_test.runtime_config.test_unit_filtering.h6"></a>
        <span class="phrase"><a name="boost_test.runtime_config.test_unit_filtering.relative_specification"></a></span><a class="link" href="test_unit_filtering.html#boost_test.runtime_config.test_unit_filtering.relative_specification">Relative
        specification</a>
      </h5>
<p>
        Term 'relative' in this context means that the configuration is based on
        either the default run status of the test units or by the command-line override
        specified by the <span class="emphasis"><em>absolute specification</em></span>; and atop of
        this, we additionally either enable some disabled test units or disable some
        enabled tests units. The relative specification is controlled by command-line
        argument <a class="link" href="../utf_reference/rt_param_reference/run_test.html" title="run_test"><code class="computeroutput"><span class="identifier">run_test</span></code></a>, with the value using similar
        syntax as in the absolute specification, but preceded with either character
        <code class="computeroutput"><span class="char">'!'</span></code> for disabling enabled test
        units or with character <code class="computeroutput"><span class="char">'+'</span></code> for
        enabling the disabled test units. This can be summarized with the following
        table:
      </p>
<div class="informaltable"><table class="table">
<colgroup>
<col>
<col>
<col>
</colgroup>
<thead><tr>
<th>
                <p>
                  command
                </p>
              </th>
<th>
                <p>
                  specification type
                </p>
              </th>
<th>
                <p>
                  semantics
                </p>
              </th>
</tr></thead>
<tbody>
<tr>
<td>
<pre xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" class="table-programlisting">&gt; test_program --<a class="link" href="../utf_reference/rt_param_reference/run_test.html" title="run_test"><code class="computeroutput"><span class="identifier">run_test</span></code></a>=!&lt;absolute_spec&gt;</pre>
              </td>
<td>
                <p>
                  disabler
                </p>
              </td>
<td>
                <p>
                  Enabled test units that match <code class="computeroutput"><span class="special">&lt;</span><span class="identifier">absolute_spec</span><span class="special">&gt;</span></code>
                  become disabled.
                </p>
              </td>
</tr>
<tr>
<td>
<pre xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" class="table-programlisting">&gt; test_program --<a class="link" href="../utf_reference/rt_param_reference/run_test.html" title="run_test"><code class="computeroutput"><span class="identifier">run_test</span></code></a>=+&lt;absolute_spec&gt;</pre>
              </td>
<td>
                <p>
                  enabler
                </p>
              </td>
<td>
                <p>
                  Disabled test units that match <code class="computeroutput"><span class="special">&lt;</span><span class="identifier">absolute_spec</span><span class="special">&gt;</span></code>
                  as well as their upstream dependencies become enabled.
                </p>
              </td>
</tr>
</tbody>
</table></div>
<p>
        The <span class="emphasis"><em>enabler</em></span> specification is used to enable a set of
        test units which are initially disabled.
      </p>
<h6>
<a name="boost_test.runtime_config.test_unit_filtering.h7"></a>
        <span class="phrase"><a name="boost_test.runtime_config.test_unit_filtering.example_descr1"></a></span><a class="link" href="test_unit_filtering.html#boost_test.runtime_config.test_unit_filtering.example_descr1">Example:
        command-line enabler</a>
      </h6>
<div class="informaltable"><table class="table">
<colgroup><col></colgroup>
<thead><tr><th>
                <p>
                  Code
                </p>
              </th></tr></thead>
<tbody><tr><td>
<pre xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" class="table-programlisting"><span class="preprocessor">#define</span> <span class="identifier">BOOST_TEST_MODULE</span> <span class="identifier">decorator_22</span>
<span class="preprocessor">#include</span> <span class="special">&lt;</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">test</span><span class="special">/</span><span class="identifier">included</span><span class="special">/</span><span class="identifier">unit_test</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">&gt;</span>

<span class="keyword">namespace</span> <span class="identifier">utf</span> <span class="special">=</span> <span class="identifier">boost</span><span class="special">::</span><span class="identifier">unit_test</span><span class="special">;</span>

<span class="identifier">BOOST_AUTO_TEST_CASE</span><span class="special">(</span><span class="identifier">test_1</span><span class="special">)</span>
<span class="special">{</span>
  <span class="identifier">BOOST_TEST</span><span class="special">(</span><span class="keyword">true</span><span class="special">);</span>
<span class="special">}</span>

<span class="identifier">BOOST_AUTO_TEST_CASE</span><span class="special">(</span><span class="identifier">test_net</span><span class="special">,</span>
  <span class="special">*</span> <span class="identifier">utf</span><span class="special">::</span><span class="identifier">disabled</span><span class="special">()</span>
  <span class="special">*</span> <span class="identifier">utf</span><span class="special">::</span><span class="identifier">description</span><span class="special">(</span><span class="string">"requires network"</span><span class="special">))</span>
<span class="special">{</span>
  <span class="identifier">BOOST_TEST</span><span class="special">(</span><span class="keyword">true</span><span class="special">);</span>
<span class="special">}</span>
</pre>
              </td></tr></tbody>
</table></div>
<div class="informaltable"><table class="table">
<colgroup><col></colgroup>
<thead><tr><th>
                <p>
                  Output
                </p>
              </th></tr></thead>
<tbody><tr><td>
<pre xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" class="table-programlisting"><span class="special">&gt;</span> <span class="identifier">decorator_22</span> <span class="special">--</span><span class="identifier">list_content</span>
<span class="identifier">test_1</span><span class="special">*</span>
<span class="identifier">test_net</span> <span class="special">:</span> <span class="identifier">requires</span> <span class="identifier">network</span>


<span class="special">&gt;</span> <span class="identifier">decorator_22</span> <span class="special">--</span><span class="identifier">log_level</span><span class="special">=</span><span class="identifier">test_suite</span>
<span class="identifier">Running</span> <span class="number">1</span> <span class="identifier">test</span> <span class="keyword">case</span><span class="special">...</span>
<span class="identifier">Entering</span> <span class="identifier">test</span> <span class="identifier">module</span> <span class="string">"decorator_22"</span>
<span class="identifier">test</span><span class="special">.</span><span class="identifier">cpp</span><span class="special">(</span><span class="number">6</span><span class="special">):</span> <span class="identifier">Entering</span> <span class="identifier">test</span> <span class="keyword">case</span> <span class="string">"test_1"</span>
<span class="identifier">test</span><span class="special">.</span><span class="identifier">cpp</span><span class="special">(</span><span class="number">6</span><span class="special">):</span> <span class="identifier">Leaving</span> <span class="identifier">test</span> <span class="keyword">case</span> <span class="string">"test_1"</span>
<span class="identifier">Leaving</span> <span class="identifier">test</span> <span class="identifier">module</span> <span class="string">"decorator_22"</span><span class="special">;</span> <span class="identifier">testing</span> <span class="identifier">time</span><span class="special">:</span> <span class="number">5</span><span class="identifier">ms</span>

<span class="special">***</span> <span class="identifier">No</span> <span class="identifier">errors</span> <span class="identifier">detected</span>


<span class="special">&gt;</span> <span class="identifier">decorator_22</span> <span class="special">--</span><span class="identifier">log_level</span><span class="special">=</span><span class="identifier">test_suite</span> <span class="special">--</span><span class="identifier">run_test</span><span class="special">=+</span><span class="identifier">test_net</span>
<span class="identifier">Running</span> <span class="number">2</span> <span class="identifier">test</span> <span class="identifier">cases</span><span class="special">...</span>
<span class="identifier">Entering</span> <span class="identifier">test</span> <span class="identifier">module</span> <span class="string">"decorator_22"</span>
<span class="identifier">test</span><span class="special">.</span><span class="identifier">cpp</span><span class="special">(</span><span class="number">6</span><span class="special">):</span> <span class="identifier">Entering</span> <span class="identifier">test</span> <span class="keyword">case</span> <span class="string">"test_1"</span>
<span class="identifier">test</span><span class="special">.</span><span class="identifier">cpp</span><span class="special">(</span><span class="number">6</span><span class="special">):</span> <span class="identifier">Leaving</span> <span class="identifier">test</span> <span class="keyword">case</span> <span class="string">"test_1"</span><span class="special">;</span> <span class="identifier">testing</span> <span class="identifier">time</span><span class="special">:</span> <span class="number">1</span><span class="identifier">ms</span>
<span class="identifier">test</span><span class="special">.</span><span class="identifier">cpp</span><span class="special">(</span><span class="number">13</span><span class="special">):</span> <span class="identifier">Entering</span> <span class="identifier">test</span> <span class="keyword">case</span> <span class="string">"test_net"</span>
<span class="identifier">test</span><span class="special">.</span><span class="identifier">cpp</span><span class="special">(</span><span class="number">13</span><span class="special">):</span> <span class="identifier">Leaving</span> <span class="identifier">test</span> <span class="keyword">case</span> <span class="string">"test_net"</span><span class="special">;</span> <span class="identifier">testing</span> <span class="identifier">time</span><span class="special">:</span> <span class="number">1</span><span class="identifier">ms</span>
<span class="identifier">Leaving</span> <span class="identifier">test</span> <span class="identifier">module</span> <span class="string">"decorator_22"</span><span class="special">;</span> <span class="identifier">testing</span> <span class="identifier">time</span><span class="special">:</span> <span class="number">16</span><span class="identifier">ms</span>

<span class="special">***</span> <span class="identifier">No</span> <span class="identifier">errors</span> <span class="identifier">detected</span>
</pre>
              </td></tr></tbody>
</table></div>
<p>
        Conversely, the <span class="emphasis"><em>disabler</em></span> specification is used to disable
        a set of test units which are initially enabled.
      </p>
<h6>
<a name="boost_test.runtime_config.test_unit_filtering.h8"></a>
        <span class="phrase"><a name="boost_test.runtime_config.test_unit_filtering.example_descr2"></a></span><a class="link" href="test_unit_filtering.html#boost_test.runtime_config.test_unit_filtering.example_descr2">Example:
        command-line disabler</a>
      </h6>
<div class="informaltable"><table class="table">
<colgroup><col></colgroup>
<thead><tr><th>
                <p>
                  Code
                </p>
              </th></tr></thead>
<tbody><tr><td>
<pre xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" class="table-programlisting"><span class="preprocessor">#define</span> <span class="identifier">BOOST_TEST_MODULE</span> <span class="identifier">decorator_23</span>
<span class="preprocessor">#include</span> <span class="special">&lt;</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">test</span><span class="special">/</span><span class="identifier">included</span><span class="special">/</span><span class="identifier">unit_test</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">&gt;</span>

<span class="keyword">namespace</span> <span class="identifier">utf</span> <span class="special">=</span> <span class="identifier">boost</span><span class="special">::</span><span class="identifier">unit_test</span><span class="special">;</span>

<span class="identifier">BOOST_AUTO_TEST_CASE</span><span class="special">(</span><span class="identifier">test_1</span><span class="special">)</span>
<span class="special">{</span>
  <span class="identifier">BOOST_TEST</span><span class="special">(</span><span class="keyword">true</span><span class="special">);</span>
<span class="special">}</span>

<span class="identifier">BOOST_AUTO_TEST_CASE</span><span class="special">(</span><span class="identifier">test_net</span><span class="special">,</span>
  <span class="special">*</span> <span class="identifier">utf</span><span class="special">::</span><span class="identifier">description</span><span class="special">(</span><span class="string">"requires network"</span><span class="special">))</span>
<span class="special">{</span>
  <span class="identifier">BOOST_TEST</span><span class="special">(</span><span class="keyword">true</span><span class="special">);</span>
<span class="special">}</span>
</pre>
              </td></tr></tbody>
</table></div>
<div class="informaltable"><table class="table">
<colgroup><col></colgroup>
<thead><tr><th>
                <p>
                  Output
                </p>
              </th></tr></thead>
<tbody><tr><td>
<pre xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" class="table-programlisting"><span class="special">&gt;</span> <span class="identifier">decorator_23</span> <span class="special">--</span><span class="identifier">list_content</span>
<span class="identifier">test_1</span><span class="special">*</span>
<span class="identifier">test_net</span><span class="special">*:</span> <span class="identifier">requires</span> <span class="identifier">network</span>


<span class="special">&gt;</span> <span class="identifier">decorator_23</span> <span class="special">--</span><span class="identifier">log_level</span><span class="special">=</span><span class="identifier">test_suite</span>
<span class="identifier">Running</span> <span class="number">2</span> <span class="identifier">test</span> <span class="identifier">cases</span><span class="special">...</span>
<span class="identifier">Entering</span> <span class="identifier">test</span> <span class="identifier">module</span> <span class="string">"decorator_23"</span>
<span class="identifier">test</span><span class="special">.</span><span class="identifier">cpp</span><span class="special">(</span><span class="number">6</span><span class="special">):</span> <span class="identifier">Entering</span> <span class="identifier">test</span> <span class="keyword">case</span> <span class="string">"test_1"</span>
<span class="identifier">test</span><span class="special">.</span><span class="identifier">cpp</span><span class="special">(</span><span class="number">6</span><span class="special">):</span> <span class="identifier">Leaving</span> <span class="identifier">test</span> <span class="keyword">case</span> <span class="string">"test_1"</span>
<span class="identifier">test</span><span class="special">.</span><span class="identifier">cpp</span><span class="special">(</span><span class="number">12</span><span class="special">):</span> <span class="identifier">Entering</span> <span class="identifier">test</span> <span class="keyword">case</span> <span class="string">"test_net"</span>
<span class="identifier">test</span><span class="special">.</span><span class="identifier">cpp</span><span class="special">(</span><span class="number">12</span><span class="special">):</span> <span class="identifier">Leaving</span> <span class="identifier">test</span> <span class="keyword">case</span> <span class="string">"test_net"</span>
<span class="identifier">Leaving</span> <span class="identifier">test</span> <span class="identifier">module</span> <span class="string">"decorator_23"</span><span class="special">;</span> <span class="identifier">testing</span> <span class="identifier">time</span><span class="special">:</span> <span class="number">14</span><span class="identifier">ms</span>

<span class="special">***</span> <span class="identifier">No</span> <span class="identifier">errors</span> <span class="identifier">detected</span>


<span class="special">&gt;</span> <span class="identifier">decorator_23</span> <span class="special">--</span><span class="identifier">log_level</span><span class="special">=</span><span class="identifier">test_suite</span> <span class="special">--</span><span class="identifier">run_test</span><span class="special">=!</span><span class="identifier">test_net</span>
<span class="identifier">Running</span> <span class="number">1</span> <span class="identifier">test</span> <span class="keyword">case</span><span class="special">...</span>
<span class="identifier">Entering</span> <span class="identifier">test</span> <span class="identifier">module</span> <span class="string">"decorator_23"</span>
<span class="identifier">test</span><span class="special">.</span><span class="identifier">cpp</span><span class="special">(</span><span class="number">6</span><span class="special">):</span> <span class="identifier">Entering</span> <span class="identifier">test</span> <span class="keyword">case</span> <span class="string">"test_1"</span>
<span class="identifier">test</span><span class="special">.</span><span class="identifier">cpp</span><span class="special">(</span><span class="number">6</span><span class="special">):</span> <span class="identifier">Leaving</span> <span class="identifier">test</span> <span class="keyword">case</span> <span class="string">"test_1"</span>
<span class="identifier">Leaving</span> <span class="identifier">test</span> <span class="identifier">module</span> <span class="string">"decorator_23"</span><span class="special">;</span> <span class="identifier">testing</span> <span class="identifier">time</span><span class="special">:</span> <span class="number">5</span><span class="identifier">ms</span>
</pre>
              </td></tr></tbody>
</table></div>
<p>
        If there are both an enabler and disabler on one command line that specify
        the same test, the test becomes disabled. I.e., the disabler takes the precedence
        over the enabler.
      </p>
<div class="note"><table border="0" summary="Note">
<tr>
<td rowspan="2" align="center" valign="top" width="25"><img alt="[Note]" src="../../../../../../doc/src/images/note.png"></td>
<th align="left">Note</th>
</tr>
<tr><td align="left" valign="top"><p>
          While enabler additionally enables the upstream dependencies (introduced
          with decorator <a class="link" href="../utf_reference/test_org_reference/decorator_depends_on.html" title="depends_on (decorator)"><code class="computeroutput"><span class="identifier">depends_on</span></code></a>), disabler does not
          disable them. Therefore when you enable and then disable the same test,
          you do not disable its upstream dependencies.
        </p></td></tr>
</table></div>
</div>
<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
<td align="left"></td>
<td align="right"><div class="copyright-footer">Copyright © 2001-2022 Boost.Test contributors<p>
        Distributed under the Boost Software License, Version 1.0. (See accompanying
        file LICENSE_1_0.txt or copy at <a href="http://www.boost.org/LICENSE_1_0.txt" target="_top">http://www.boost.org/LICENSE_1_0.txt</a>)
      </p>
</div></td>
</tr></table>
<hr>
<div class="spirit-nav">
<a accesskey="p" href="../runtime_config.html"><img src="../../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../runtime_config.html"><img src="../../../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../../index.html"><img src="../../../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="custom_command_line_arguments.html"><img src="../../../../../../doc/src/images/next.png" alt="Next"></a>
</div>
</body>
</html>
